package com.i2863.receipt.entity;

import com.i2863.receipt.util.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * 奖品表实体
 * Created by Administrator on 2018/6/8.
 */
@Table(name = "d_prize")
@Entity
@Data
public class Prize extends BaseEntity{

    /**
     * 奖品名称（特等奖，一等奖...）
     */
    @Column(name = "name",nullable = false)
    private String name;

    /**
     * 金额
     */
    @Column(name = "money",nullable = false)
    private BigDecimal money;

    /**
     * 奖品等级（0 特等奖，1一等奖，2二等奖...）
     */
    @Column(name = "level",nullable = false)
    private  Integer level;

    /**
     * 奖项类别（1场内200,2场内600）
     */
    @Column(name = "prize",nullable = true)
    private Integer prize;

    /**
     * 奖项名称
     */
    @Column(name = "prize_name",nullable = true)
    private String prizeName="";

    /**
     * 范围（范围（1场内奖品，2未入围抽取者奖品））
     */
    @Column(name = "prize_range",nullable = false)
    private Integer prizeRange;

    /**
     * 人数（奖项人数）
     */
    @Column(name = "number",nullable = false)
    private Integer number;

    /**
     * 所属站点
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="site_id")
    private Site site;

    /**
     * 场内
     */
    public static final Integer INSIDE=1;

    /**
     * 未入围
     */
    public static final Integer OUTSIDE=2;

}
